package com.dd.cloud.user.entity.resource;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Lx
 * @version 1.0
 * @date 2023/10/13
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "帖子信息表")
public class PostInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 头像链接
     */
    @Column(comment = "头像链接", length = 128)
    private String headSculpture;

    /**
     * 姓名
     */
    @Column(comment = "姓名", length = 20)
    private String name;

    /**
     * 标签
     */
    @Column(comment = "标签", length = 200)
    private String label;

    /**
     * 帖子分类 1医师分享 2精彩医案 3一般帖子
     */
    @Column(comment = "帖子分类 1医师分享 2精彩医案 3一般帖子")
    private Integer type;

    /**
     * 帖子标题
     */
    @Column(comment = "帖子标题", length = 80)
    private String title;

    /**
     * 封面图片
     */
    @Column(comment = "封面图片", length = 333)
    private String coverImg;

    /**
     * 帖子正文
     */
    @Column(comment = "帖子正文", type = MySqlTypeConstant.LONGTEXT)
    private String content;

    /**
     * 阅读数
     */
    @Column(comment = "阅读数")
    private Integer readCount;

    /**
     * 点赞数
     */
    @Column(comment = "点赞数")
    private Integer likeCount;

    /**
     * 转发数
     */
    @Column(comment = "转发数")
    private Integer forwardsCount;

    /**
     * 帖子状态 1正常 2下架 -1删除
     */
    @Column(comment = "帖子状态 1正常 2下架 -1删除")
    private Integer status;

    /**
     * 创建人id
     */
    @Column(comment = "创建人id")
    private Integer createId;

    /**
     * 创建人类型
     */
    @Column(comment = "创建人类型")
    private Integer createType;

    /**
     * 排序
     */
    @Column(comment = "排序")
    private Integer sort;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;
}
